package com.eunion.web.common.vo.jpa;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import com.google.common.collect.Lists;

/**
 * 查询条件类型列表.
 * 
 * 
 * @version 2015-9-12
 */
public class SpecDefine {

    /**
     * 等于.
     */
    public static final String CON_EQ = "eq";

    /**
     * 大于.
     */
    public static final String CON_GT = "gt";

    /**
     * 大于等于.
     */
    public static final String CON_GE = "ge";

    /**
     * 小于.
     */
    public static final String CON_LT = "lt";

    /**
     * 小于等于.
     */
    public static final String CON_LE = "le";

    /**
     * 不等于.
     */
    public static final String CON_NEQ = "neq";

    /**
     * like.
     */
    public static final String CON_LK = "like";

    /**
     * no like.
     */
    public static final String CON_NLK = "notlike";

    /**
     * 包含.
     */
    public static final String CON_IN = "in";

    /**
     * 不包含.
     */
    public static final String CON_NIN = "notin";

    /**
     * 为空.
     */
    public static final String CON_NULL = "null";

    /**
     * 不为空.
     */
    public static final String CON_NTNULL = "notnull";

    /**
     * 条件列表.
     */
    public static final List<String> CON_LIST = Lists.newArrayList(CON_EQ, CON_GT, CON_GE, CON_LT, CON_LE, CON_NEQ, CON_LK, CON_NLK, CON_IN, CON_NIN, CON_NTNULL, CON_NULL);

    /**
     * 并且.
     */
    public static final String CD_AND = "and";

    /**
     * 或.
     */
    public static final String CD_OR = "or";

    /**
     * 条件关系列表.
     */
    public static final List<String> CD_LIST = Lists.newArrayList(CD_AND, CD_OR);

    /**
     * 升序.
     */
    public static final String CA_ASC = "asc";

    /**
     * 降序.
     */
    public static final String CA_DESC = "desc";

    /**
     * 升降序列表.
     */
    public static final List<String> CA_LIST = Lists.newArrayList(CA_ASC, CA_DESC);

    /**
     * STRING.
     */
    public static final String TP_STRING = String.class.getSimpleName();

    /**
     * INT.
     */
    public static final String TP_INT = Integer.class.getSimpleName();

    /**
     * BOOLEAN.
     */
    public static final String TP_BOOLEAN = Boolean.class.getSimpleName();

    /**
     * DOUBLE.
     */
    public static final String TP_DOUBLE = Double.class.getSimpleName();

    /**
     * DATE.
     */
    public static final String TP_DATE = Date.class.getSimpleName();

    /**
     * DATETIME.
     */
    public static final String TP_DATETIME = Timestamp.class.getSimpleName();

    /**
     * 类型列表.
     */
    public static final List<String> TP_LIST = Lists.newArrayList(TP_STRING, TP_INT, TP_BOOLEAN, TP_DOUBLE, TP_DATE, TP_DATETIME);

}
